package com.yc.navy.snacknet.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yc.navy.snacknet.bean.ProductInfo;
import com.yc.navy.snacknet.mapper.IProductinfoMapper;
import com.yc.navy.snacknet.service.IProductinfoService;
import com.yc.navy.snacknet.util.StringUtil;

@Service
public class ProductinfoServiceImpl implements IProductinfoService{
	
	@Autowired
	private IProductinfoMapper productinfoMapper;
	

	@Override
	public ProductInfo selectAllGoods(ProductInfo map) {
		if(StringUtil.checkNull(map.getPname(), map.getPics(), map.getPrice(), map.getBalance())) {
			return null;
		}
		return productinfoMapper.selectAllGoods(map);
	}

	@Override
	public ProductInfo selectgoods(ProductInfo map) {
		if(StringUtil.checkNull(map.getPno())) {
			return null;
		}
		return productinfoMapper.selectAllGoods(map);
	}

}
